package com.ccb.testcenter.tools;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * 
 */


import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;

import org.apache.log4j.Logger;


/**
 * @author congyang
 *
 */
public class BtsMap{
	private static final Logger logger = Logger.getLogger(BtsMap.class);
	public static void main(String[] args) {
		String jsonString="";
		try {
			System.setIn(new BufferedInputStream(new FileInputStream("src/main/A0181S202")));
			Scanner scanner  = new Scanner(System.in);
			while(scanner.hasNext()){
				jsonString = scanner.nextLine();
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
		String uid = JsonParseTool.getDataFromAbsolutePath(jsonString,"$.uid");
		String serviceId = JsonParseTool.getDataFromRelativePath(jsonString,"serviceId");
		String reqData = JsonParseTool.getDataFromRelativePath(jsonString,"request");
		String reqDataJson = JsonParseTool.getDataFromAbsolutePath(jsonString,"requestData");
		
		System.out.println(reqData);
		System.out.println(reqDataJson);
		
		/*if(recordFilter != null && !recordFilter.accept(serviceId)){
			return;
		}*/
		String testV =  JsonParseTool.getRequestDataFromAbsolutePath(jsonString,"$.requestData.CDFWINMC-ENTITY-LL");
		String testV2 =  JsonParseTool.getRequestDataFromRelativePath(jsonString,"CDFWINMS-SEC-MAC");
		String testV3 =  JsonParseTool.getRequestDataFromRelativePath(jsonString,"");
		System.out.println(uid);
		System.out.println(serviceId);
		System.out.println(testV);
		System.out.println(testV2);
		System.out.println(testV3);
	}
   
}
